#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>
size_t printarr(int* const p, int sz) {
	assert(p);
	int sum = 0;
	for (int i = 0; i < sz; i++) {
		printf("%d ", i[p]);
		sum += 1;
	}
	printf("\n");
	return sum;
}

void exchange(int* a, int* b,int sz) {
	assert(a && b);
	for (int i = 0; i < sz; i++) {
		int tmp = a[i];
		a[i] = b[i];
		b[i]=tmp;
	}
}
int main() {

	int arr1[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[10] = { 10,9,8,7,6,5,4,3,2,1 };
	int sz = sizeof(arr1 )/sizeof( arr1[0]);
	printarr(arr1, sz);
	printarr(arr2, sz);
	exchange(arr1, arr2, sz);
	printarr(arr1, sz);
	printarr(arr2, sz);
	return 0;
}